Question: The sequence $(a_n)$ is defined recursively by $a_0=1$, $a_1=\sqrt[19]{2}$, and $a_n=a_{n-1}a_{n-2}^2$ for $n\geq 2$. What is the smallest positive integer $k$ such that the product $a_1a_2\cdots a_k$ is an integer?
Solution: Let $b_n = 19 \log_2 a_n.$  Then $a_n = 2^{\frac{b_n}{19}},$ so
\[2^{\frac{b_n}{19}} = 2^{\frac{b_{n - 1}}{19}} \cdot 2^{\frac{2b_{n - 2}}{19}} = 2^{\frac{b_{n - 1} + 2b_{n - 2}}{19}},\]which implies
\[b_n = b_{n - 1} + 2b_{n - 2}.\]Also, $b_0 = 0$ and $b_1 = 1.$

We want
\[a_1 a_2 \dotsm a_k = 2^{\frac{b_1 + b_2 + \dots + b_k}{19}}\]to be an integer.  In other words, we want $b_1 + b_2 + \dots + b_k$ to be a multiple of 19.

So, let $s_k = b_1 + b_2 + \dots + b_k.$  Using the recurrence $b_n = b_{n - 1} + 2b_{n - 2},$ we can compute the first few terms of $(b_n)$ and $(s_n)$ modulo 19:
\[
\begin{array}{c|c|c}
n & b_n & s_n \\ \hline
1 & 1 & 1 \\
2 & 1 & 2 \\
3 & 3 & 5 \\
4 & 5 & 10 \\
5 & 11 & 2 \\
6 & 2 & 4 \\
7 & 5 & 9 \\
8 & 9 & 18 \\
9 & 0 & 18 \\
10 & 18 & 17 \\
11 & 18 & 16 \\
12 & 16 & 13 \\
13 & 14 & 8 \\
14 & 8 & 16 \\
15 & 17 & 14 \\
16 & 14 & 9 \\
17 & 10 & 0
\end{array}
\]Thus, the smallest such $k$ is $\boxed{17}.$

Alternatively, we can solve the recursion $b_0 = 0,$ $b_1 = 1,$ $b_n = b_{n - 1} + 2b_{n - 2}$ to get
\[b_n = \frac{2^n - (-1)^n}{3}.\]